package com.klouda.gboff;

public class BookInfo implements Comparable<BookInfo> {

  public BookInfo(String p_name, String p_author, String p_id, byte[] p_thumbnail) {
    this.m_author = p_author;
    this.m_name = p_name;
    this.m_id = p_id;
    this.m_thumbnail = p_thumbnail;
  }

  public String getNname() {
    return m_name;
  }
  public void setName(String p_name) {
    this.m_name = p_name;
  }
  public String getAuthor() {
    return m_author;
  }
  public void setAuthor(String p_author) {
    this.m_author = p_author;
  }  

  public String getId() {
    return m_id;
  }

  public void setId(String m_id) {
    this.m_id = m_id;
  }  
  
  public  byte[] getThumbnail() {
    return m_thumbnail;
  }
  
  public void setThumbnail(byte[] p_thumbnail) {
    m_thumbnail = p_thumbnail;
  }
  
  private String m_name;
  private String m_author;
  //id se bere z google books
  private String m_id;
  private byte[] m_thumbnail;
  
 
  @Override
  public int compareTo(BookInfo arg0) {
    return this.m_id.compareTo((arg0.getId()));
  }
  
  public boolean equals(BookInfo obj) {
    return this.m_id.equals(obj.getId());
  }
  
  public int hashCode() {
    return m_id.hashCode();
  }
  
  
  
}
